﻿namespace EyFramework.Library
{
    public class SeachColumn
    {
        private string _colCode = string.Empty; //字段实际名

        private string _colName = string.Empty; //字段显示名

        private bool _colShow = true;//是否显示列

        //字段类型  只有ID，DISPLAY，COL三种情况；
        //ID代表列为ID列
        //DISPLAY代表选择后在选择框里显示的值
        //COL代表只在下拉框中显示，方便用户了解每条数据的信息
        private SEARCHCOLUMNTYPE _colType;

        public string ColCode
        {
            get { return _colCode; }
            set { _colCode = value; }
        }

        public string ColName
        {
            get { return _colName; }
            set { _colName = value; }
        }

        public SEARCHCOLUMNTYPE ColType
        {
            get { return _colType; }
            set { _colType = value; }
        }

        public bool ColShow
        {
            get { return _colShow; }
            set { _colShow = value; }
        }

        public SeachColumn(string colCode, string colName, SEARCHCOLUMNTYPE colType, bool colShow = true)
        {
            this._colCode = colCode;
            this._colName = colName;
            this._colType = colType;
            this._colShow = colShow;
        }
    }

    public enum SEARCHCOLUMNTYPE
    {
        ID,
        DISPLAY,
        COL
    }
}